<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="cn.leven.domain.User" %><%--
  Created by IntelliJ IDEA.
  User: Leven Han
  Date: 2022/10/12
  Time: 18:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8"  language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--page指令：设置响应mime格式 字符编码 import导包 --%>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <style>
    .flex{
      display: flex;
    }
    .flex-1{
      flex: 1;
    }
  </style>
  <body>
  <%
    List list = new ArrayList<String>();
    list.add(new User("张三","男",18));
    list.add(new User("里斯","女",16));
    list.add(new User("王五","男",38));
    request.setAttribute("list",list);
  %>
  <div class="flex">
    <div class="flex-1">
      <h2>jstl练习</h2>
      <table>
        <tr>
          <th>编号</th>
          <th>姓名</th>
          <th>性别</th>
          <th>年龄</th>
        </tr>
        <c:forEach items="${list}" var="user" varStatus="s">
          <tr>
            <td>${s.count}</td>
            <td>${user.name}</td>
            <td>${user.sex}</td>
            <td>${user.age}</td>
          </tr>
        </c:forEach>
      </table>
      <a href="/study_02/home.html">去用户管理案例静态页</a>
      <a href="/study_02/home.jsp">去用户管理案例动态页</a>
      <a href="${pageContext.request.contextPath}/login.jsp">登录</a>
    </div>
    <div class="flex-1">
      <h2>软件设计架构</h2>
      <ol>
        <li>视图层</li>
        <li>业务逻辑层</li>
        <li>数据访问层</li>
      </ol>
    </div>
    <div class="flex-1">
      <h2>用户管理案例</h2>
  <p>需求：用户信息增删改查操作</p>
  <p>设计： <br>
    <h3>1.Servlet +JSP + MySql + JDBCTemplate + Duird + BeanUtils + Tomcat<br></h3>
    <h3>2.数据库设计<br></h3>
      <code>
        create database study02;<br>
        use study02;<br>
        create table user {<br>
          id int primary key auto_increment,<br>
          name varchar(20) not null,<br>
          gender varchar(5),<br>
          age int,<br>
          address varchar(32),<br>
          qq varchar(20),<br>
          email varchar(50)<br>
        };<br>
      </code>
    <h3> 3.开发</h3> <br>
    1.环境搭建 （1.创建数据库 2.创建项目，引入需要的jar包）<br>
      2.编码<br>
  </p>
    </div>
  </div>
  </body>
</html>
